package com.caifu.enums;


/**
 * ClassName :SocialSecurityTypeEnum
 *
 * @author :  yb
 * @description ：
 * @date : 2020-11-08 09:31
 */
public enum SocialSecurityTypeEnum {

    /**
     * 社保类型
     */
    CB("2001", "城保")
    ,ZB("2002", "镇保")
    ,JB("2003", "居保")
    ,NB("2004", "农保")
    ,ZDYL("2005", "征地养老")
    ,QTWM("2006","其他(未满60周岁)")
    ,QTTS("2006","其他(特殊对象)")
    ,QTBK("2006","其他(互助帮困)")
    ;

    SocialSecurityTypeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }


    public static String getName(String key) {
        for (SocialSecurityTypeEnum c : SocialSecurityTypeEnum.values()) {
            if (c.getKey().equals(key)) {
                return c.value;
            }
        }
        return "";
    }

    public static String getEnumKey(String name) {
        for (SocialSecurityTypeEnum c : SocialSecurityTypeEnum.values()) {
            if (c.getValue().equals(name)) {
                return c.key;
            }
        }
        return "";
    }

    private String key;
    private String value;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
